PGetColorInfo(short cModel, const char * sColorName);
short cModel;
kColorRGB for RGB color model, expressed in percentages
kColorCYMK for process color (CMYK) model
kColorHLS for HLS color model
kColorMultiInk for multi-ink model
kColorRGB255 for RGB color model, expressed in units from 0 to 255const char * sColorName;
Name of the color exactly as it appears on the Colors palette
short nPercent1;
cModel Meaning kColorRGB Percentage of red, in tenths of a percent (100.0% = 1000) kColorRGB255 Units of red from 0 to 255 kColorCMYK
kColorMultiInkPercentage of cyan, in tenths of a percent (100.0% = 1000) kColorHLS Degrees of hue in tenths of a degree
short nPercent2;
cModel Meaning kColorRGB Percentage of green, in tenths of a percent (100.0% = 1000) kColorRGB255 Units of green from 0 to 255 kColorCMYK
kColorMultiInkPercentage of magenta, in tenths of a percent (100.0% = 1000) kColorHLS Percentage of lightness in tenths of a percent (100.0% = 1000). 0 for a tint.
short nPercent3;
cModel Meaning kColorRGB Percentage of blue, in tenths of a percent (100.0% = 1000) kColorRGB255 Units of blue from 0 to 255 kColorCMYK
kColorMultiInkPercentage of yellow, in tenths of a percent (100.0% = 1000) kColorHLS Percentage of saturation in tenths of a percent (100.0% = 1000).
0 for a tint.
short nPercent4;
cModel Meaning kColorCMYK
kColorMultiInkPercentage of black, in tenths of a percent (100.0% = 1000) kColorRGB
kColorRGB255
kColorHLS0 (Unused)
short cType;
kColorTypeSpot for spot
kColorTypeProcess for process
kColorTypeTint for tint
kColorTypeHifi for HiFi color
short nEPS;
Number of imported EPS files assigned that color
short bOverprint;
0 for knockout
1 for overprint
const char * sBaseColor;
Name of base color used for tint; null if not a tint
short cDefinedModel;
Model used in internal definition of color:For each ink in the returned list (make sure PListQuery::Count() > 0 before referencing any of these):
0 (zero)for RGB color model expressed in units from 0 to 255
1 for process color (CMYK) model
2 for HLS color model
3 for L*a*b color model
4 for multi-ink model
const char * sInkName;
Name of ink.
short dInkLevel;
Percentage of specified ink-coverage value, be tween 0 and 100 in tenths of a percent (100.0 = 1000)Reference to color library is lost for color-picker defined colors. No association with the original color library is maintained if the color was originally defined with a color picker. Only the CMYK values remain.
cModel ignored for tints. PageMaker ignores the cModel parameter if sColorName is a tint.
Example. This examples defines a CYMK color "Peach" using the PDefineColor command. It then requests the definition of Peach using the RGB model. Notice that while a color can be defined using one model, you can request the color definition using a different model.
PDefineColor("Peach", process, kColorCMYK, 0, 15, 30, 10, 0);
PGetColorInfo info(kColorRGB, "Peach");
info.nPercent1; // 850 (R)
info.nPercent2; // 700 (G)
info.nPercent3; // 900 (B)
info.nPercent4; // 0 (-)
info.cType; // 1 (kColorTypeSpot)
info.nEPS; // 0
info.bOverprint; // false
info.sBaseColor; // ""
info.cDefinedModel; // 4 (multi-ink)
info.Count(); // 0 (no inks)
Comments or suggestions? Contact Adobe Developer Support